// Boolean true false
let a = true;
let b = a;
let c = !a;
let d = !!a;
// Number 独有的运算 +-*/  % **
let h = 12;
let i = h % 5;
let j = h / 7;
let k = h ** 2;

/* 
 String                 "1.2 "  "1" | ""  "zhangsan" "万" 
 Number             1.4   1.2  3 2 1| 0 NaN
 Boolean                        true|false
*/
// String ->Number
// 字符串变数字 大部分情况下 变为NaN ，纯数字格式 变为 对应数字
let o = "1.3";
let p = "1.2kkk";
let q = "";
let r = Number(o);
let s = Number(p);
let t = Number(q);

// Number->Boolean
// 0 NaN转为false 其他转为true
let u = 0;
let v = NaN;
let w = -11;
let x = Boolean(u);
let y = Boolean(v);
let z = Boolean(w);
// String ->Boolean
// "" 长度为0的字符串转为false ，其他转为true
let aa = "";
let bb = "   ";
let cc = "zhangsan";
let dd = Boolean(aa);
let ee = Boolean(bb);
let ff = Boolean(cc);

// undefined null => Boolean-false
// let gg = undefined;
let gg;
let hh = null;
let kk = Boolean(gg);
let ll = Boolean(hh);
let ii = {};
let jj = Boolean(ii); //true

// constant 常量 一般用在声明容器类 本身整体不能改变，但是容器内元素可变
const pi = 3.1415926;
const person = {
  name: "John",
  age: 222,
};
// person = {
//     name: "John",
//     age: 11,
// };
person.age = 11;

//  += ;
let oo = 3;
// oo += 2;
oo = oo + 2;
oo++; // oo+=1 oo = oo +1

// 三元表达式
let rr = 4 < 5;
let ss = rr ? "zhangsan" : "lisi";
